package data.dictionary;

import java.util.Iterator;

import data.set.OfflineSet;
import data.set.OfflineSetIterator;

/**
 * This interface describes an indexed dictionnary of X objects indexed from 0 to size()-1 
 * @author denoyer
 *
 * @param <X> the object indexed in the dictionnary
 */

public interface Dictionary<X> extends OfflineSet<X>
{
	/**
	 * return -1 if no x
	 * @param x
	 */
	public int indexOf(X x);
	
	/**
	 * The size of the dictionnary
	 */
	public long size();
	
	/**
	 * 
	 * @return the iterator over the objects
	 */
	public Iterator<X> iterator();
	
	/**
	 * 
	 * @return The Iterator over the couples (int, Object)
	 */
	public OfflineSetIterator<X> offlinesetiterator();
	
}
